package com.hospital.schedule.module.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hospital.common.dto.schedule.module.*;
import com.hospital.common.pojo.TDoctorLeaveRecord;
import com.hospital.common.pojo.TDoctorSchedule;
import com.hospital.common.vo.schedule.module.FindDoctorScheduleByAdminVo;
import com.hospital.common.vo.schedule.module.FindDoctorScheduleByDoctorVo;
import com.hospital.common.vo.schedule.module.FindDoctorScheduleByTimeVo;

import java.util.List;

/**
 * <p>
 * 排班表 服务类
 * </p>
 *
 * @author author
 * @since 2025-09-11
 */
public interface ITDoctorScheduleService extends IService<TDoctorSchedule> {
    /**
     * 添加排班
     * @param addDoctorScheduleDtoList
     * @return
     */

    boolean addDoctorSchedule(List<AddDoctorScheduleDto> addDoctorScheduleDtoList);

    /**
     * 医生自己查自己排班
     * @param findDoctorScheduleByDoctorDto
     * @return
     */

    List<FindDoctorScheduleByDoctorVo> findDoctorScheduleByDoctor(FindDoctorScheduleByDoctorDto findDoctorScheduleByDoctorDto);

    /**
     * 管理员查排班，也可以患者查
     * @param findDoctorScheduleByAdminDto
     * @return
     */

    List<FindDoctorScheduleByAdminVo> findDoctorScheduleByAdmin(FindDoctorScheduleByAdminDto findDoctorScheduleByAdminDto);

    /**
     * 请假时修改排班状态，中间状态和成功都不能展示给患者
     * @param tDoctorLeaveRecord
     * @return
     */

    Integer updateScheduleByLeaveRecord(TDoctorLeaveRecord tDoctorLeaveRecord);

    Integer updateScheduleByAgreeLeaveRecord(TDoctorLeaveRecord doctorLeaveRecord);

    Integer updateScheduleByRefuseLeaveRecord(TDoctorLeaveRecord tDoctorLeaveRecord);

    Integer disagreeLeaveRecordByAdmin(TDoctorLeaveRecord tDoctorLeaveRecord);

    List<TDoctorSchedule> findDoctorScheduleByAttend(AddDoctorAttendanceDto addDoctorAttendanceDto);

    List<Long> findDoctorId(String formatToEndOfDay, String formatToStartOfDay);

    List<Long> fineDoctorByDoctorSchedule(Long departmentId, String startTime, String endTime);

    FindDoctorScheduleByTimeVo findDoctorScheduleByTime(FindDoctorScheduleByTimeDto findDoctorScheduleByTimeDto);

    Integer fineDoctorBySchedule(FindDoctorScheduleOfScheduleDto findDoctorScheduleOfScheduleDto);
}
